package org.swxjava;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.swxjava.assembler.MarshallException;
import org.swxjava.assembler.SwxAssemblerConfig;

/**
 * A Marshaller is responsible for all the on-the-wire communication between SWX
 * Server and the HTTP channel.
 */
public interface Marshaller {

	void setSwxCompilerConfig(SwxAssemblerConfig config);

	Call marshallInbound(HttpServletRequest request,
			HttpServletResponse response) throws IOException, MarshallException;

	void marshallOutbound(Reply reply, HttpServletRequest request,
			HttpServletResponse response) throws IOException, MarshallException;
}
